package ma.projet.managedbean;

import javax.faces.event.ActionEvent;  
import javax.faces.context.FacesContext;  
import javax.faces.application.FacesMessage; 
  
public class ButtonBean {  
      
    public void cree(ActionEvent actionEvent) {  
        addMessage("Page Creation");  
    }  
      
    public void maj(ActionEvent actionEvent) {  
        addMessage("Page Mise a Jour");  
    }  
      
    public void supp(ActionEvent actionEvent) {  
        addMessage("Page Suppression");  
    }  
      
    public void addMessage(String summary) {  
        FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary,  null);  
        FacesContext.getCurrentInstance().addMessage(null, message);  
    }  
}  
         